﻿<?xml version="1.0" encoding="UTF-8"?>
<form title="物料定义" icon="cube.gif" description="" xmlns="http://www.evolutility.com">
  <data dbtable="MRP_MaterialMain"  splogin="asp.net membership" dbcolumnpk="ID" sppaging="EvoSP_PagedItem @SQLselect, @SQLtable, @SQLfrom, @SQLwhere, @SQLorderby, @SQLpk, @pageid, @pagesize" />
  <tab label="基本信息">
    <panel userid="1" label="基本信息" width="80">
      <field id="85" type="text" typeid="5" label="物料编码" dbcolumn="MCode" dbcolumnread="MCode" maxlength="32" readonly="2" required="1" optional="" fpos="10" search="1" searchadv="1" searchlist="1" height="1" width="20" />
      <field id="86" type="textmultiline" typeid="6" label="物料名称" dbcolumn="Name" dbcolumnread="Name" maxlength="128" readonly="0" required="1" optional="" fpos="20" search="0" searchadv="1" searchlist="0" height="1" width="100" />
      <field id="103" type="textmultiline" typeid="6" label="规格" dbcolumn="Specification" dbcolumnread="Specification" maxlength="256" readonly="0" required="1" optional="" fpos="190" search="0" searchadv="1" searchlist="1" height="3" width="100" />
      <field id="134" type="lov" typeid="5" label="物料状态" dbcolumn="Status" dbcolumnread="MaterialStatus" defaultvalue="1"
dbtablelov="View_MaterialStatus_List" dbcolumnreadlov="DisplayText" maxlength="0" readonly="0" required="1" optional="" fpos="30" search="0" searchadv="1" searchlist="" height="1" width="20" />
      <field id="111" type="integer" typeid="10" label="安全库存" defaultvalue="0" dbcolumn="SafetyStock" dbcolumnread="SafetyStock" maxlength="8" readonly="0" required="1" optional="" fpos="270" search="" searchadv="1" searchlist="" height="1" width="20" />
      <field id="93" type="date" typeid="17" label="生效日期" format="{0:d}" defaultvalue ="_now" dbcolumn="BeginDate" dbcolumnread="BeginDate" maxlength="4" readonly="0" required="" optional="" fpos="90" search="0" searchadv="1" searchlist="" height="1" width="30" />
      <field id="94" type="date" typeid="17" label="失效日期" format="{0:d}" defaultvalue ="2099-12-31" dbcolumn="EndDate" dbcolumnread="EndDate" maxlength="4" readonly="0" required="0" optional="" fpos="100" search="0" searchadv="1" searchlist="" height="1" width="30" />
      <field id="87" type="textmultiline" typeid="6" label="简短描述" dbcolumn="ShortDesc" dbcolumnread="ShortDesc" maxlength="256" readonly="0" required="" optional="" fpos="30" search="0" searchadv="1" searchlist="1" height="3" width="100" />
    </panel>
    <panel userid="1"  label="分类信息" width="20">
      <field id="38" type="lov" typeid="5" label="物料种类" dbcolumn="MType" dbcolumnread="MaterialType"
   dbtablelov="View_MaterialType_List" dbcolumnreadlov="DisplayText" maxlength="0" readonly="2" required="1" optional="" fpos="30" search="0" searchadv="1" searchlist="1" height="1" width="100" />
      <field id="238" type="lov" typeid="5" label="型号大小" dbcolumn="SizeType" dborderlov ="ID" dbcolumnread="MaterialSizeType"
   dbtablelov="View_ProductSize_List" dbcolumnreadlov="DisplayText" maxlength="0" readonly="0" required="0" optional="" fpos="30" search="1" searchadv="1" searchlist="1" height="1" width="100" />
      <field id="134" type="lov" typeid="5" label="物料来源" dbcolumn="SourceType" dbcolumnread="MaterialSource"
dbtablelov="View_MaterialSource_List" dbcolumnreadlov="DisplayText" maxlength="0" readonly="0" required="1" optional="" fpos="30" search="0" searchadv="1" searchlist="0" height="1" width="100" />
    </panel>
  </tab>
  <tab label="属性">
    <panel userid="1"  label="属性" width="70">
      <field id="38" type="lov" typeid="5" label="库存单位" dbcolumn="Unit" dbcolumnread="DisplayText"
   dbtablelov="View_UnitType_List" dbcolumnreadlov="DisplayText" maxlength="0" readonly="0" required="1" optional="" fpos="30" search="0" searchadv="1" searchlist="0" height="1" width="20" />
      <field id="99" type="decimal" typeid="10" label="长度(MM)" dbcolumn="Length" dbcolumnread="Length" maxlength="8" readonly="0" required="" optional="" fpos="150" search="0" searchadv="1" searchlist="" height="1" width="20" />
      <field id="101" type="decimal" typeid="10" label="单重(kg)" dbcolumn="Weight" defaultvalue="0" dbcolumnread="Weight" maxlength="8" readonly="0" required="" optional="" fpos="170" search="0" searchadv="1" searchlist="1" height="1" width="20" />
      <field id="102" type="textmultiline" typeid="6" label="型号" dbcolumn="ModelDesc" dbcolumnread="ModelDesc" maxlength="256" readonly="0" required="" optional="" fpos="180" search="0" searchadv="1" searchlist="" height="3" width="100" />
      <field id="112" type="textmultiline" typeid="6" label="备注" dbcolumn="Remark" dbcolumnread="Remark" maxlength="256" readonly="0" required="" optional="" fpos="280" search="" searchadv="1" searchlist="" height="3" width="100" />

    </panel>
    <panel userid="1"  label="包装及仓储" width="30">
      <field id="104" type="text" typeid="5" label="包装方式" dbcolumn="PackName" dbcolumnread="PackName" maxlength="64" readonly="0" required="" optional="" fpos="200" search="" searchadv="1" searchlist="" height="1" width="50" />
      <field id="110" type="text" typeid="5" label="仓储位置" dbcolumn="StorePlace" dbcolumnread="StorePlace" maxlength="128" readonly="0" required="" optional="" fpos="260" search="" searchadv="1" searchlist="" height="1" width="50" />
      <field id="108" type="integer" typeid="10" label="最小订货量" dbcolumn="MinOrder" dbcolumnread="MinOrder" maxlength="8" readonly="0" required="" optional="" fpos="240" search="" searchadv="1" searchlist="" height="1" width="50" />
    </panel>
    <panel userid="1"  label="采购单位" width="30">      
      <field id="38" type="lov" typeid="5" label="采购单位" dbcolumn="PurcharUnit" dbcolumnread="DisplayText_PurcharUnit"
   dbtablelov="View_UnitType_List2" dbcolumnreadlov="DisplayText" maxlength="0" readonly="0" required="" optional="" fpos="30" search="0" searchadv="1" searchlist="0" height="1" width="30" />

      <field id="107" type="decimal" typeid="10" label="采购单位换算比率" defaultvalue="1" dbcolumn="PurcharRatio" dbcolumnread="PurcharRatio" maxlength="8" readonly="0" required="" optional="" fpos="230" search="" searchadv="1" searchlist="" height="1" width="70" />
    </panel>
  </tab>
  <tab label="其他信息">
    <panel userid="1" label="其他信息" width="100">
      <field id="1292" type="text" typeid="5" label="图纸编码" dbcolumn="DiagramCode" dbcolumnread="DiagramCode" maxlength="50" readonly="0" required="" optional="" fpos="80" search="0" searchadv="1" searchlist="1" height="1" width="50" />
      <field id="96" type="textmultiline" typeid="6" label="描述" dbcolumn="Description" dbcolumnread="Description" maxlength="256" readonly="0" required="" optional="" fpos="120" search="0" searchadv="1" searchlist="" height="3" width="100" />
    </panel>
  </tab>
  <queries label="预定义的查询">
    <query label="所有产品" dbwhere="t.MType = '5'" url="product" />
    <query label="所有材料" dbwhere=" t.MType = '6'" url="Material" />
    <query label="所有辅料" dbwhere="t.MType = '7'" url="OptionalMaterial" />
    <query label="快速检查：没有客户的产品" dbwhere="t.MType=5 and not exists(Select * from MRP_CustomerProductDefinition where MRP_CustomerProductDefinition.ProductID=t.ID)" url="NoCustomer" />
    <query label="快速检查：没有供应商的材料" dbwhere="t.MType=6 and not exists(Select * from [MRP_SupplierMaterialPrice] where [MRP_SupplierMaterialPrice].MaterialID=t.ID)" url="NoSupplier" />
    <query label="快速检查：单重为0的型材" dbwhere="t.MCode like 'M1.%' and Weight=0" url="M1AndWeightIsZero" />
    <query label="快速检查：库存单位不是米(m)的型材" dbwhere="t.MCode like 'M1.%' and Unit!=4" url="M1AndUnitIsnotM" />
    <query label="快速检查：采购单位不是根(m)的型材" dbwhere="t.MCode like 'M1.%' and PurcharUnit!=2" url="M1AndPurcharUnitIsnotM" />
    <query label="快速检查：单位不同，但采购单位换算比率为1的材料" dbwhere="PurcharUnit!=Unit and PurcharRatio=1" url="PurcharRatioIsOne" />
  </queries>
</form>
